<%@ page import="com.shamar.blog.entity.BlogUser" %>
<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> <!--输出,条件,迭代标签库-->
<%@ page isELIgnored="false" %>
<%!
    public String username;
    public BlogUser M;
    public Boolean islogin;
%>
<%
    M = (BlogUser) session.getAttribute("currentBlogUser");
    if (M!=null){ username = M.getUsername();
    islogin = true;}
    else{
        islogin=false;
    }
%>
<link rel='stylesheet' href='css/header.css' type='text/css' media='all' />
<div class="header-wrapper">
    <header>
        <div class="container">
            <div class="logo-container">
                <!-- Website Logo -->
                <a href="/community/index" title="程序员博客社区">
                    <img src="images/logo.png" alt="程序员博客社区">
                </a>
                <span class="tag-line">在这里分享你的编程心得</span>
            </div>


            <!-- Start of Main Navigation -->
            <nav class="main-nav">
                <div class="menu-top-menu-container">
                    <ul id="menu-top-menu" class="clearfix">
                        <li class="current-menu-item"><a href="/community/index">首页</a></li>
                        <li><a href="/community/articles_list?o=1">博文列表</a>
                            <ul class="sub-menu" style="z-index: 2">
                                <li><a href="/community/articles_list?o=1">最新</a></li>
                                <li><a href="/community/articles_list?o=2">最热</a></li>
                                <c:if test="<%= islogin%>">
                                    <li><a href="#">我赞过的</a></li>
                                </c:if>
                            </ul>
                        </li>
                        <li><a href="/community/Faq">FAQs</a></li>
                        <li><a href="/community/contactUs">联系我们</a></li>
                        <c:if test="<%= islogin%>">
                        <li><a href="#">欢迎您,<%= username%></a>
                            <ul class="sub-menu" style="z-index: 2">
                                <li><a href="/user/userprofile">账号设置</a></li>
                                <li><a href="/community/push_blog">写博客</a></li>
                                <li><a href="/community/articles_list?o=3">我的博文</a></li>
                                <li><a href="#">我的收藏</a></li>
                                <li><a id="logout" href="#">退出</a></li>
                            </ul>
                        </li>
                        </c:if>
                        <c:if test="<%= !islogin%>">
                        <li><a href="/user/userlogin">登录</a></li>
                        <li><a href="/admin/register">注册</a></li>
                        </c:if>
                    </ul>
                </div>
            </nav>
            <!-- End of Main Navigation -->

        </div>
    </header>
    <script src="js/userlogout.js"></script>
</div>